<?php
class BrowserTool
{
	/*
	 * 取得浏览器版本
	 */
    static function getBrowserVersion() {
		switch (true){
			case strpos($_SERVER["HTTP_USER_AGENT"],"360SE"):
				return "360";
			case strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 9.0"):
				return "IE9";
			case strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 8.0"):
				return "IE8";
			case strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 7.0"):
				return "IE7";
			case strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 6.0"):
				return "IE6";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/2"):
				return "Firefox/2";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/3"):
				return "Firefox/3";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/4"):
				return "Firefox/4";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/5"):
				return "Firefox/5";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/6"):
				return "Firefox/6";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/7"):
				return "Firefox/7";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/8"):
				return "Firefox/8";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox/14"):
				return "Firefox/14";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Firefox"):
				return "Firefox";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Chrome"):
				return "Google";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Safari"):
				return "Safari";
			case strpos($_SERVER["HTTP_USER_AGENT"],"Opera"):
				return "Opera";
			default:
				return "other";
		}
    }
}